package com.weibo4j.api.response.account;

import java.util.List;

import com.weibo4j.api.WeiboResponse;
import com.weibo4j.api.domain.School;
import com.weibo4j.api.json.JSON;

public class SchoolListResponse extends WeiboResponse<List<School>>{

	private List<School> model;


    @Override
    public List<School> getModel() {
        if (success && model == null) {
            isSuccess();
        }
        return model;
    }

    @Override
    public boolean isSuccess() {
        boolean isSuccess = super.isSuccess();
        if (isSuccess && model == null) {
            model = JSON.parseArray(jsonString, School.class);
        }
        return isSuccess;
    }

}
